#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org

START=10

boot() {
	mount | grep overlayfs | grep -q 'workdir=/overlay/work' && {
		test -f /rom/etc/sda.ready || touch /rom/etc/sda.ready
		mount -o remount,ro /rom
	}

	# check for usb mouse* factory reset
	lspci | grep -qE 'VMware Virtual Machine|VirtualBox' && return 0
	ls /dev/input | grep -q mouse && {
		echo mouse detected, do foctory reset and halt
		/usr/sbin/system_reset -h
	}
}
